package com.binance.rabbitmq.config;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * Created by robin.wu on 2018/11/30.
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Log4j2
@ConfigurationProperties(prefix = "rabbitmq.auto-config")
public class DefaultConfig {

    @Builder.Default
    private boolean enabled = true;

    @NestedConfigurationProperty
    private ExchangeConfig defaultExchange;

    @NestedConfigurationProperty
    private QueueConfig defaultQueue;

    @NestedConfigurationProperty
    private DeadLetterConfig deadLetterConfig;

    @NestedConfigurationProperty
    private DelayConfig delayConfig;

    @NestedConfigurationProperty
    private FailConfig failConfig;

    @NestedConfigurationProperty
    private AlternateConfig alternateConfig;
}
